package com.hyy.listener;


import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class HelloQueueListener {

    //指定获取名字叫做hello的队列
    @RabbitListener(queues = "hello")
    public void hander(Message message) {

        System.out.println("收到消息");
    }
}
